package co.msk8.client.visual.calculator.view;

import co.msk8.client.visual.base.presenter.BasePresenter;
import co.msk8.client.visual.base.view.BaseView;
import co.msk8.shared.Operation;

import com.google.gwt.user.client.ui.HasValue;

public interface CalculatorView<T> extends BaseView {

	public interface CalculatorPresenter<T> extends BasePresenter {

		void setOperationContainer(T container);

		T getOperationContainer();
		
		void addDigit(int digit);
		
		void addDigit(String digit);

		void removeLast();
		
		void addOperator(String string);
		
		void initFirstOperator(int digit);
		
		void initSecondOperator(int digit);
		
		void initOperation(Operation operation);

	}
	
	/**
	 * Devuelve el display de la calculadora.
	 * @return
	 */
	HasValue<String> getDisplay();
	
	void setPresenter(CalculatorPresenter<T> calculatorPresenterImpl);

	void setOperationText(String string);
	
}
